<template>
  <div>
    <Fu1></Fu1>
    <Refs ref="box"></Refs>
    <h1 ref="dom" v-if="flag">这是h1标签</h1>
    <button @click="fl">按钮</button>
  </div>
</template>
<script>
import Fu1 from './provide/Fu1.vue'
import Refs from './provide/Ref.vue'
export default {
export default {
  name: '',
  provide () {
    return {
      ss: '我是爷爷吗'
    }
  },
  components: {
    Fu1,
    Refs
  },
  data () {
    return {
      flag: true
    }
  },
  created () {
  },
  computed: {
  },
  methods: {
    fl () {
      this.$nextTick(() => {
        console.log(this.$refs.dom);
      })
      this.flag = !this.flag
    }
  },
  mounted () {
    console.log(this.$refs.box);
    console.log(this.$refs.box.dd);
    console.log(this.$refs.dom);
    this.$refs.box.fh()
  },
}
</script>
<style lang='less'  scoped>
</style>
